package com.arch.dev.server.bean;
import java.util.Date;

 

import javax.persistence.Column;

import javax.persistence.Entity;

import javax.persistence.GeneratedValue;

import javax.persistence.Id;

 

import javax.persistence.Table;

import javax.persistence.Temporal;

import javax.persistence.TemporalType;

 

import org.hibernate.annotations.GenericGenerator;

 

@Entity

@Table(name = "pdf")

public class Pdf extends AbstractTimestampEntity {

 

               private Date date;

 

               private Long id;

 

               private String name;

 

               public void setId(Long id) {

                              this.id = id;

               }

 

               public Pdf() {

 

               }

 

               public Pdf(String name, Date date) {

                              this.name = name;

                              this.date = date;

               }

 

               @Temporal(TemporalType.TIMESTAMP)

               @Column(name = "PDF_DATE")

               public Date getDate() {

                              return date;

               }

 

               @Id

               @GeneratedValue(generator = "increment")

               @GenericGenerator(name = "increment", strategy = "increment")

               @Column(name = "PDF_ID")

               public Long getId() {

                              return id;

               }

 

               @Column(name = "PDF_NAME")

               public String getName() {

                              return name;

               }

 

               public void setDate(Date date) {

                              this.date = date;

               }

 

               public void setName(String name) {

                              this.name = name;

               }

 

               @Override

               public String toString() {

                              return new String("Id : " + id + " Name : " + name + " Date: " + date);

               }

 

               public boolean equals(Object obj) {

                              Pdf pdf = (Pdf) obj;

 

                              return getId().equals(pdf.getId());

 

               };

 

}

 